package com.cy1;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int x = scanner.nextInt();
            int y = scanner.nextInt();
            Sub sub = new Sub(x, y);
//            sub.calculate();
            Base base=new Sub(x,y);
            Sub sub1=(Sub)base;
            System.out.println(base.x);
            System.out.println(base.y);
            System.out.println(sub1.x);
            System.out.println(sub1.y);

        }

    }

}

class Base {

     int x;
     int y;
    public Base(){

    }

    public Base(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }

    public void calculate() {
        System.out.println(getX() * getY());
    }

}

class Sub extends Base {

    //write your code here......
    int x;
    int y;
    public Sub(int x,int y){
        this.x=x;
        this.y=y;
    }
     @Override
     public int getX() {
         return x;
     }

    @Override
    public int getY() {
        return y;
    }
     @Override
     public void calculate(){
         if(getY()!=0){
             System.out.println(super.getX());
             System.out.println(getX()/getY());
         }else{
               System.out.println("Error");
         }
         
     }
}